import { createRouter, createWebHistory } from 'vue-router'
import HomeIndex from '@/views/layout/HomeView.vue'
import MyIndex from '@/views/layout/MyView.vue'
import YuyueIndex from '@/views/layout/YuyueView.vue'
import LayoutIndex from '@/views/layout/LayoutIndex.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: LayoutIndex,
      redirect: '/home',
      children: [
        {
          path: '/home',
          component: HomeIndex
        },
        {
          path: '/yuyue',
          component: YuyueIndex
        },
        {
          path: '/my',
          component: MyIndex
        },
      ]
    },
  ],
})

export default router
